Skip to content

Conversation

bjorn3
Copy link
Member

@bjorn3 bjorn3 commented Mar 12, 2025

All commits should preserve existing behavior.

@rustbot
Copy link
Collaborator

rustbot commented Mar 12, 2025

r? @jieyouxu

rustbot has assigned @jieyouxu.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Mar 12, 2025
@rustbot
Copy link
Collaborator

rustbot commented Mar 12, 2025

Some changes occurred in compiler/rustc_codegen_ssa

cc @WaffleLapkin

rustc_error_messages was changed

cc @davidtwco, @compiler-errors, @TaKO8Ki

@petrochenkov petrochenkov self-assigned this Mar 12, 2025
@rust-log-analyzer

This comment has been minimized.

@bjorn3 bjorn3 force-pushed the sysroot_handling_cleanup branch from 4958015 to c61439c Compare March 12, 2025 13:46
@petrochenkov
Copy link
Contributor

I was complaining about this in #129418, but only did one step of the cleanup.
(Maybe some of this behavior should actually be changed to become more consistent.)

@petrochenkov petrochenkov removed their assignment Mar 12, 2025
@petrochenkov
Copy link
Contributor

r=me unless jieyouxu wants to look.

@@ -1214,7 +1214,7 @@ impl Default for Options {
describe_lints: false,
output_types: OutputTypes(BTreeMap::new()),
search_paths: vec![],
maybe_sysroot: None,
sysroot: filesearch::materialize_sysroot(None),
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this should use PathBuf::new()? It is only used for tests.

@rust-log-analyzer

This comment has been minimized.

@bjorn3 bjorn3 force-pushed the sysroot_handling_cleanup branch from 5c2c5df to bdc7041 Compare March 12, 2025 14:26
@bjorn3
Copy link
Member Author

bjorn3 commented Mar 12, 2025

Fixed rustdoc and added a commit to remove the unused host_tlib_path field.

@rust-log-analyzer

This comment has been minimized.

@jieyouxu
Copy link
Member

Seems fine to me as well, thanks!

@bors r=petrochenkov,jieyouxu

@bors
Copy link
Collaborator

bors commented Mar 12, 2025

📌 Commit 1543256 has been approved by petrochenkov,jieyouxu

It is now in the queue for this repository.

@bors bors removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 12, 2025
@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Mar 12, 2025
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Mar 13, 2025
…=petrochenkov,jieyouxu

Cleanup sysroot locating a bit

All commits should preserve existing behavior.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Mar 13, 2025
…=petrochenkov,jieyouxu

Cleanup sysroot locating a bit

All commits should preserve existing behavior.
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 13, 2025
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#137816 (attempt to support `BinaryFormat::Xcoff` in `naked_asm!`)
 - rust-lang#138109 (make precise capturing args in rustdoc Json typed)
 - rust-lang#138343 (Enable `f16` tests for `powf`)
 - rust-lang#138356 (bump libc to 0.2.171 to fix xous)
 - rust-lang#138371 (Update compiletest's `has_asm_support` to match rustc)
 - rust-lang#138380 (ci: add runners for vanilla LLVM 20)
 - rust-lang#138404 (Cleanup sysroot locating a bit)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 13, 2025
…iaskrgr

Rollup of 6 pull requests

Successful merges:

 - rust-lang#137816 (attempt to support `BinaryFormat::Xcoff` in `naked_asm!`)
 - rust-lang#138109 (make precise capturing args in rustdoc Json typed)
 - rust-lang#138343 (Enable `f16` tests for `powf`)
 - rust-lang#138356 (bump libc to 0.2.171 to fix xous)
 - rust-lang#138371 (Update compiletest's `has_asm_support` to match rustc)
 - rust-lang#138404 (Cleanup sysroot locating a bit)

r? `@ghost`
`@rustbot` modify labels: rollup
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Mar 13, 2025
Rollup merge of rust-lang#138404 - bjorn3:sysroot_handling_cleanup, r=petrochenkov,jieyouxu

Cleanup sysroot locating a bit

All commits should preserve existing behavior.
@bors bors merged commit ad23e9d into rust-lang:master Mar 13, 2025
6 checks passed
@rustbot rustbot added this to the 1.87.0 milestone Mar 13, 2025
github-actions bot pushed a commit to model-checking/verify-rust-std that referenced this pull request Mar 14, 2025
…iaskrgr

Rollup of 6 pull requests

Successful merges:

 - rust-lang#137816 (attempt to support `BinaryFormat::Xcoff` in `naked_asm!`)
 - rust-lang#138109 (make precise capturing args in rustdoc Json typed)
 - rust-lang#138343 (Enable `f16` tests for `powf`)
 - rust-lang#138356 (bump libc to 0.2.171 to fix xous)
 - rust-lang#138371 (Update compiletest's `has_asm_support` to match rustc)
 - rust-lang#138404 (Cleanup sysroot locating a bit)

r? `@ghost`
`@rustbot` modify labels: rollup
@bjorn3 bjorn3 deleted the sysroot_handling_cleanup branch June 5, 2025 14:27
workingjubilee added a commit to workingjubilee/rustc that referenced this pull request Jun 8, 2025
…r=petrochenkov

Replace all uses of sysroot_candidates with get_or_default_sysroot

Before this change we had two different ways to attempt to locate the sysroot which are inconsistently used:
* `get_or_default_sysroot` which tries to locate based on the 0th cli argument and if that doesn't work falls back to locating it using the librustc_driver.so location and returns a single path.,
* `sysroot_candidates` which takes the former and additionally does another attempt at locating using `librustc_driver.so` except without linux multiarch handling and then returns both paths.,

The latter was originally introduced to be able to locate the codegen backend back when cg_llvm was dynamically linked even for a custom driver when the `--sysroot` passed in does not contain a copy of cg_llvm. Back then `get_or_default_sysroot` did not attempt to locate the sysroot based on the location of librustc_driver.so yet. Because that is now done, the only case where removing `sysroot_candidates` can break things is if you have a custom driver inside what looks like a sysroot including the `lib/rustlib` directory, but which is missing some parts of the full sysroot like eg rust-lld.

Follow up to rust-lang#138404
workingjubilee added a commit to workingjubilee/rustc that referenced this pull request Jun 8, 2025
…r=petrochenkov

Replace all uses of sysroot_candidates with get_or_default_sysroot

Before this change we had two different ways to attempt to locate the sysroot which are inconsistently used:
* `get_or_default_sysroot` which tries to locate based on the 0th cli argument and if that doesn't work falls back to locating it using the librustc_driver.so location and returns a single path.,
* `sysroot_candidates` which takes the former and additionally does another attempt at locating using `librustc_driver.so` except without linux multiarch handling and then returns both paths.,

The latter was originally introduced to be able to locate the codegen backend back when cg_llvm was dynamically linked even for a custom driver when the `--sysroot` passed in does not contain a copy of cg_llvm. Back then `get_or_default_sysroot` did not attempt to locate the sysroot based on the location of librustc_driver.so yet. Because that is now done, the only case where removing `sysroot_candidates` can break things is if you have a custom driver inside what looks like a sysroot including the `lib/rustlib` directory, but which is missing some parts of the full sysroot like eg rust-lld.

Follow up to rust-lang#138404
workingjubilee added a commit to workingjubilee/rustc that referenced this pull request Jun 9, 2025
…r=petrochenkov

Replace all uses of sysroot_candidates with get_or_default_sysroot

Before this change we had two different ways to attempt to locate the sysroot which are inconsistently used:
* `get_or_default_sysroot` which tries to locate based on the 0th cli argument and if that doesn't work falls back to locating it using the librustc_driver.so location and returns a single path.,
* `sysroot_candidates` which takes the former and additionally does another attempt at locating using `librustc_driver.so` except without linux multiarch handling and then returns both paths.,

The latter was originally introduced to be able to locate the codegen backend back when cg_llvm was dynamically linked even for a custom driver when the `--sysroot` passed in does not contain a copy of cg_llvm. Back then `get_or_default_sysroot` did not attempt to locate the sysroot based on the location of librustc_driver.so yet. Because that is now done, the only case where removing `sysroot_candidates` can break things is if you have a custom driver inside what looks like a sysroot including the `lib/rustlib` directory, but which is missing some parts of the full sysroot like eg rust-lld.

Follow up to rust-lang#138404
rust-timer added a commit that referenced this pull request Jun 9, 2025
Rollup merge of #142089 - bjorn3:sysroot_handling_cleanup3, r=petrochenkov

Replace all uses of sysroot_candidates with get_or_default_sysroot

Before this change we had two different ways to attempt to locate the sysroot which are inconsistently used:
* `get_or_default_sysroot` which tries to locate based on the 0th cli argument and if that doesn't work falls back to locating it using the librustc_driver.so location and returns a single path.,
* `sysroot_candidates` which takes the former and additionally does another attempt at locating using `librustc_driver.so` except without linux multiarch handling and then returns both paths.,

The latter was originally introduced to be able to locate the codegen backend back when cg_llvm was dynamically linked even for a custom driver when the `--sysroot` passed in does not contain a copy of cg_llvm. Back then `get_or_default_sysroot` did not attempt to locate the sysroot based on the location of librustc_driver.so yet. Because that is now done, the only case where removing `sysroot_candidates` can break things is if you have a custom driver inside what looks like a sysroot including the `lib/rustlib` directory, but which is missing some parts of the full sysroot like eg rust-lld.

Follow up to #138404
github-actions bot pushed a commit to rust-lang/miri that referenced this pull request Jun 10, 2025
…enkov

Replace all uses of sysroot_candidates with get_or_default_sysroot

Before this change we had two different ways to attempt to locate the sysroot which are inconsistently used:
* `get_or_default_sysroot` which tries to locate based on the 0th cli argument and if that doesn't work falls back to locating it using the librustc_driver.so location and returns a single path.,
* `sysroot_candidates` which takes the former and additionally does another attempt at locating using `librustc_driver.so` except without linux multiarch handling and then returns both paths.,

The latter was originally introduced to be able to locate the codegen backend back when cg_llvm was dynamically linked even for a custom driver when the `--sysroot` passed in does not contain a copy of cg_llvm. Back then `get_or_default_sysroot` did not attempt to locate the sysroot based on the location of librustc_driver.so yet. Because that is now done, the only case where removing `sysroot_candidates` can break things is if you have a custom driver inside what looks like a sysroot including the `lib/rustlib` directory, but which is missing some parts of the full sysroot like eg rust-lld.

Follow up to rust-lang/rust#138404
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants